﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using InSafetyAirClient.InSafetyAirService;

namespace InSafetyAirClient.GUI.Airport
{
    public partial class CreateAip : UserControl
    {
        public CreateAip()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            InSafetyAirService.Airport airport=new InSafetyAirService.Airport();
            airport.name = textBox1.Text;
            airport.town = textBox3.Text;
            airport.gmt = (byte)numericUpDown1.Value;
            ServiceSingle.Instance.getService().AddToDatabase(airport);

            textBox3.Text = "";
            textBox1.Text = "";
        }
    }
}
